import {
  post
} from '../ck/plugin/axios'

class BaseSubjectManage {

  //添加学科
  static async addSubject({
    SubjectName,
    Describe,
    Image
  }) {
    return post('api/Manage/BaseSubject/Add', {
      SubjectName,
      Describe,
      Image
    })
  }

  //获取学科列表
  static async getSubjectList({
    SubjectName,
    Page,
    Limit
  }) {
    return post('api/Manage/BaseSubject/PageSearch', {
      SubjectName,
      Page,
      Limit
    })
  }

  //点击编辑按钮展示数据
  static async showInfoDetail(ID) {
    return post('api/Manage/BaseSubject/SearchModelDetails', {
      ID
    })
  }

  //编辑表单里面的确定按钮，进行真正的编辑
  static async editSubjectInfo(ID, {
    SubjectName,
    Describe,
    Image

  }) {
    return post('api/Manage/BaseSubject/Update', {
      ID,
      SubjectName,
      Describe,
      Image
    })
  }
  //删除操作
  static async deleteSubjectInfo(ID) {
    return post('api/Manage/BaseSubject/Delete', {
      ID
    })
  }

  //上移排序
  static async sortSubjectInfo(
    ID,
    Sort,
    Type
  ) {
    return post('api/Manage/BaseSubject/SetSortMethod', {
      ID,
      Sort,
      Type
    })
  }

  //改变状态
  static async changeStatus(ID, Status) {
    return post('api/Manage/BaseSubject/UpdateStatus', {
      ID,
      Status
    })
  }

}

export default BaseSubjectManage
